Overview

expoFitter is a specialized tool for visualizing and fitting non-linear electrophysiological data, built using R, Shiny, and Flexdashboard. The tool provides robust methodologies for fitting dynamic processes through single- and double-exponential models, allowing researchers to extract time constants and assess model fitness. Its robust non-linear least squares optimization makes expoFitter efficient for fitting complex data.

In scientific applications, expoFitter, or its backend logic, has been used to analyze slow neuronal currents like the calcium-dependent potassium current (\(I_{KCa}\); Ellison et al., in progress; Thuma et al., in progress). While it does not directly measure intracellular calcium (\([Ca^{2+}]_i\)) dynamics, the tool’s modeling logic and uncovered temporal information have served as indirect measures of \([Ca^{2+}]_i\) time-dependent changes in neurons of the lobster pyloric network, as demonstrated in ongoing research (Ellison et al., in progress; Thuma et al., in progress).

Tool Features

Installation

expoFitter Locally

There are several ways to access expoFitter. If you want the entirety of the repository, you can clone it to your local machine using these terminal commands (terminal used generically throughout):

git clone https://github.com/ryEllison/expoFitter.git
cd expoFitter

Ensure you are in the desired directory before executing the terminal commands. You can also use a point-and-click approach by navigating to Code in Github and selecting Download ZIP. Downloading expoFitter this way will require your moving expoFitter from your local downloads to the desired location on your machine before decompressing the file.

To run expoFitter locally, ensure that R is installed on your system, as well as the following packages:

and your system’s environmental variables provide terminal access to R’s interpreter Rscript. Package installation is automated and can be completed by running the install_dependencies pseudo-executable in the \bin directory.

expoFitter can then be deployed utilizing your machine as a local server via the expoFitter_R pseudo-executable in the \bin directory. To make any tweaks or alterations to the tool to fit your particular use case, the code is dispersed throughout appropriate directories (e.g., \app, \scripts, and \src).

expoFitter as Electron App

expoFitter has also been built as a portable, desktop Electron app. The Electron build can be found in the \electron directory. However, for access to the desktop app the \installer directory can be downloaded using this terminal approach:

git clone --no-checkout https://github.com/ryEllison/expoFitter.git
cd expoFitter
git sparse-checkout init --cone
git sparse-checkout set ./installer
git checkout master
cd installer
pseudo_installer.bat

Again, ensuring you are in the directory where you wish the installer to be placed before executing the terminal commands.

You can also use a point-and-click approach and directly download the installer by navigating to the installer.zip, the ellipsis option in the upper right corner, and selecting download (or, using the respective keyboard shortcuts once installer.zip has been accessed, e.g., CTRL + SHIFT + S). Downloading expoFitter this way will require your moving the installer from your local downloads to the desired location on your machine before decompressing the file and executing the pseudo-installer pseudo-executable.

expoFitter on shinyapps.io

Lastly, expoFitter has been made publicly available as a web app, which is hosted on shinyapps.io and can be accessed using https://ryellison.shinyapps.io/expofitter/.

Usage

Data Input

where, in this example, \(t\) is time in seconds (s) and \(i\) is current data in nanoamps (nA).

Model Selection and Initialization

Visualization, Fitting, and Performance Reporting

Saving Results

All visualizations are saved as a .pdf file.

Supplemental Information

Levenberg-Marquardt Algorithm

Update rule:

\[\mathbf{x}_{k+1} = \mathbf{x}_k - \left( \mathbf{J}^T \mathbf{J} + \lambda \mathbf{I} \right)^{-1} \mathbf{J}^T \mathbf{r}\]

Where:

Gradient Descent (when \(\lambda\) is large)

Update rule:

\[\mathbf{x}_{k+1} = \mathbf{x}_k - \alpha \nabla F(\mathbf{x}_k)\]

Where:

Gauss-Newton Method (when \(\lambda\) is small)

Update rule:

\[\mathbf{x}_{k+1} = \mathbf{x}_k - \left( \mathbf{J}^T \mathbf{J} \right)^{-1} \mathbf{J}^T \mathbf{r}\]

These methods ensure high-fidelity parameter estimation for complex neuroelectrophysiological datasets.